openapi: 3.0.1
info:
  title: Product Master Data Api
  description: ''
  version: '2.0'
paths:
  /v2/TradeItems:
    get:
      tags:
        - Trade Item
      summary: Get Trade Items
      description: Only Internal and External Service tokens can get access
      operationId: TradeItems_GetTradeItems
      parameters:
        - name: RetailerCompanyId
          in: query
          schema:
            type: string
            format: uuid
        - name: Gtin
          in: query
          schema:
            type: string
        - name: PageNumber
          in: query
          description: Default value - 1
          schema:
            maximum: 2147483646
            minimum: 1
            type: integer
            format: int32
        - name: PageSize
          in: query
          description: Default value - 1, Max value - 100
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/TraceOne.Api.SeedWork.Utilities.Pagination.PagedList`1[[ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel,_ProductMasterData.Application,_Version=27.20.0.0,_Culture=neutral,_PublicKeyToken=null]]
components:
  schemas:
    JsonPatchDocument:
      type: array
      items:
        $ref: '#/components/schemas/JsonPatchOperation'
      description: Array of operations to perform
    JsonPatchOperation:
      type: object
      properties:
        op:
          type: string
        value:
          oneOf:
            - type: object
              nullable: true
            - type: object
              nullable: true
        path:
          type: string
    ProductMasterData.Application.ViewModels.TradeItems.TradeItem:
      title: TradeItem
      type: object
      properties:
        tradeItemId:
          type: string
          format: uuid
        tradeItemName:
          type: string
        retailerCompanyId:
          type: string
          format: uuid
        gtin:
          type: string
          nullable: true
        status:
          title: TradeItemStatus
          allOf:
            - $ref: >-
                #/components/schemas/ProductMasterData.Domain.TradeItems.TradeItemStatus
        brand:
          title: Brand
          allOf:
            - $ref: >-
                #/components/schemas/ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel_Brand
          nullable: true
        netContents:
          title: List`1
          type: array
          items:
            $ref: >-
              #/components/schemas/ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel_NetContent
      additionalProperties: false
    ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel_Brand:
      title: Brand
      type: object
      properties:
        brandId:
          type: string
          format: uuid
        brandName:
          type: string
      additionalProperties: false
    ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel_NetContent:
      title: NetContent
      type: object
      properties:
        unitOfMeasureId:
          type: string
          format: uuid
        value:
          type: string
      additionalProperties: false
    ProductMasterData.Domain.TradeItems.TradeItemStatus:
      title: TradeItemStatus
      enum:
        - Active
        - Archived
      type: string
    TraceOne.Api.SeedWork.Utilities.Pagination.PagedList`1[[ProductMasterData.Application.ViewModels.TradeItems.TradeItemViewModel,_ProductMasterData.Application,_Version=27.20.0.0,_Culture=neutral,_PublicKeyToken=null]]:
      title: PagedList`1
      type: object
      properties:
        items:
          title: List`1
          type: array
          items:
            $ref: >-
              #/components/schemas/ProductMasterData.Application.ViewModels.TradeItems.TradeItem
          nullable: true
        totalCount:
          type: integer
          format: int32
        currentCount:
          type: integer
          format: int32
          readOnly: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://ws-users.int.traceone.com/default/connect/token
          scopes:
            t1_api: t1_api
security:
  - Bearer: []
servers:
  - url: https://apis.traceone.com/pmd
    description: Production
  - url: https://apis-ppd.traceone.com/pmd
    description: Sandbox
